﻿using AutoMapper;
using IOA.MES.Log.DataAccess.Entity;
using IOA.MES.Log.DataAccess.VModel;
using IOA.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IOA.MES.Auth.Business
{
    /// <summary>
    /// 用户管理
    /// </summary>
    public class LoginHistoryMgr
    {
        private MESLogContext logDb = new MESLogContext("MESLog");

        /// <summary>
        /// 添加用户登录日志
        /// </summary>
        /// <param name="model">日志对象</param>
        public void Add(VLoginHistory model)
        {
            logDb.LoginHistories.Add(Mapper.Map<LoginHistory>(model));
            logDb.SaveChanges();
        }
    }
}
